home *** CD-ROM | disk | FTP | other *** search
- on SetMemoNavPuce AccuZ, NotValidConsulte
- global MemoNavPuce
- set AccuA to word 1 of AccuZ
- set AccuM to the movieName
- set AccuB to chars(AccuM, 1, length(AccuM) - 4)
- set AccuC to word 2 of AccuZ
- set AccuD to word 3 of AccuZ
- set AccuE to word 4 of AccuZ
- set AccuF to word 5 of AccuZ
- set MemoNavPuce to AccuA & " " & AccuB & " " & AccuC & " " & AccuD & " " & AccuE & " " & AccuF
- if paramCount() < 2 then
- ValidConsulte()
- end if
- end
-
- on ValidConsulte
- global DcDemo, MemoNavPuce, listChampsNavig
- if DcDemo then
- exit
- end if
- set MemoMovie to word 1 of MemoNavPuce
- set PosdepAnim to getOne(listChampsNavig, MemoMovie)
- if PosdepAnim = 0 then
- exit
- end if
- set NbreFrame to getAt(listChampsNavig, PosdepAnim + 2)
- if NbreFrame = 0 then
- setAt(listChampsNavig, PosdepAnim + 3, 1)
- return ValideToutConsulte()
- end if
- set MemoAnim to word 2 of MemoNavPuce
- set MemoFrame to word 3 of MemoNavPuce
- set listFrame to getAt(listChampsNavig, PosdepAnim + 1)
- set Pz to 1
- repeat with compt = 1 to NbreFrame
- if (getAt(listFrame, Pz) = MemoAnim) and (getAt(listFrame, Pz + 1) = MemoFrame) then
- set ChampsFrame to getAt(listChampsNavig, PosdepAnim + 4)
- put "1" into char compt of ChampsFrame
- setAt(listChampsNavig, PosdepAnim + 4, ChampsFrame)
- if offset("0", ChampsFrame) = 0 then
- setAt(listChampsNavig, PosdepAnim + 3, 1)
- end if
- exit repeat
- end if
- set Pz to Pz + 2
- end repeat
- ValideToutConsulte()
- end
-
- on ValideToutConsulte
- global listChampsNavig
- set ToutConsulte to 1
- set Pz to 5
- repeat with compt = 1 to getAt(listChampsNavig, 1)
- set ToutConsulte to ToutConsulte * getAt(listChampsNavig, Pz)
- set Pz to Pz + 5
- end repeat
- SetToutConsulte(ToutConsulte)
- end
-
- on InitVarNavig
- RecuplistChampsNavig()
- end
-
- on SetToutConsulte Op
- global listChampsNavig
- setAt(listChampsNavig, count(listChampsNavig), Op)
- end
-
- on RecupToutConsulte
- global listChampsNavig
- return getLast(listChampsNavig)
- end
-
- on RecuplistChampsNavig
- global listChampsNavig
- set ChampsNavig to the text of cast "N_ChampsNavig"
- set listChampsNavig to list(0)
- set Pz to 1
- repeat with ComptAnim = 1 to 100
- set Anim to word Pz of ChampsNavig
- set Pz to Pz + 1
- if Anim = "ENDCHAMPS" then
- exit repeat
- end if
- set Caract to word Pz of ChampsNavig
- set listFrame to 0
- set NbreFrame to 0
- set FrameConsulte to 0
- if Caract <> "#" then
- set listFrame to list()
- set FrameConsulte to EMPTY
- repeat with ComptFrame = 1 to 50
- add(listFrame, word Pz of ChampsNavig)
- add(listFrame, word Pz + 1 of ChampsNavig)
- set NbreFrame to NbreFrame + 1
- set FrameConsulte to FrameConsulte & "0"
- set Pz to Pz + 2
- if word Pz of ChampsNavig = "#" then
- exit repeat
- end if
- end repeat
- end if
- add(listChampsNavig, Anim)
- add(listChampsNavig, listFrame)
- add(listChampsNavig, NbreFrame)
- add(listChampsNavig, 0)
- add(listChampsNavig, FrameConsulte)
- set Pz to Pz + 1
- end repeat
- setAt(listChampsNavig, 1, ComptAnim - 1)
- add(listChampsNavig, 0)
- return listChampsNavig
- end
-